home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group97a.txt
/
000103_icon-group-sender _Wed Apr 9 08:34:22 1997.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Received: by cheltenham.cs.arizona.edu; Wed, 9 Apr 1997 06:35:46 MST
Message-Id: <1.5.4.32.19970409133422.00702988@post.its.mcw.edu>
X-Sender: cdt@post.its.mcw.edu
X-Mailer: Windows Eudora Light Version 1.5.4 (32)
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Wed, 09 Apr 1997 08:34:22 -0500
To: Kostas Oikonomou <ko@surya.ho.att.com>, icon-group@cs.arizona.edu
From: Chris Tenaglia <cdt@post.its.mcw.edu>
Subject: Re: Problem with Icon 9.3
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Content-Length: 1487
I think lists are a different kind of data
than strings. I think it has something to
do with pointers and addresses.
That's why I do arrays using keys of concatenated
strings.
# The state diagram.
sd := table([])
sd["q0,ok"] := "q1"
sd["q0,nok"] := "q0"
sd["q1,nok"] := "q0"
sd["q1,ok"] := "q2"
# q2 is the final state
or
# The state diagram.
sd := table([])
sd[q0 || "," || ok] := "q1"
sd[q0 || "," || nok] := "q0"
sd[q1 || "," || nok] := "q0"
sd[q1 || "," || ok] := "q2"
# q2 is the final state
Chris
At 12:28 PM 4/7/97 -0400, Kostas Oikonomou wrote:
>Hi,
>
>I have the following simple (I think) program:
>
>link ximage
>
>procedure main()
>
> # The state diagram.
> sd := table([])
> sd[["q0","ok"]] := "q1"
> sd[["q0","nok"]] := "q0"
> sd[["q1","nok"]] := "q0"
> sd[["q1","ok"]] := "q2"
> # q2 is the final state
>
> every x := key(sd) do write(ximage(x), ":", sd[x])
>
>end
>
>This doesn't behave as I think it should. The problem seems to be a
>table whose keys are lists. Is there something wrong with this kind of
>structure? I don't see anything to that effect in the 3d edition of the
>Icon book, Ch. 6 on tables.
>
>I'd appreciate your help.
>--
> Kostas Oikonomou
>
>
Chris Tenaglia (system manag
r) | cdt@post.its.mcw.edu
Medical College of Wisconsin |
8701 W. Watertown Plank Rd. | Ce que vous voyez est
Milwaukee, WI 53226 (414)456-8765 | Ce que vous obtenez !